import proFetch from "../../../../../public/functions/project-fetch";

/**
 * 列表查询
 * @param pk_psndoc_sub
 * @param pageCode
 * @param appCode
 * @param areaCode
 * @returns {Promise<any>}
 * @constructor
 */
export default function QueryDataCardAction(pk_psndoc_sub, pageCode, appCode, areaCode = 'dataCard') {
    const postData = {
        pk_psndoc_sub,
        pageCode,
        appCode,
        areaCode,
        tempFlag: true
    };

    return new Promise(((resolve, reject) => {
            proFetch({
                url: '/nccloud/hrcm/common/QueryDataCardAction.do',
                body: postData,
            })
                .then((res) => {
                    if (res.success) {
                        resolve(res)
                    }
                });
        })
    );
}